<!DOCTYPE HTML>
<html  lang="zh" xmlns:th="http://www.thymeleaf.org">
<meta charset="utf-8">
<head th:include="include :: header"></head>
<body class="white-bg">
    <div class="wrapper wrapper-content animated fadeInRight ibox-content">
        <form class="form-horizontal m" id="form-dict-add">
			<div class="form-group">	
				<label class="col-sm-3 control-label">数据值：</label>
				<div class="col-sm-8">
					<input id="value" name="value" class="form-control" type="text" required>
				</div>
			</div>
			<div class="form-group">	
				<label class="col-sm-3 control-label">标签名：</label>
				<div class="col-sm-8">
					<input id="label" name="label" class="form-control" type="text" required>
				</div>
			</div>
			<div class="form-group">	
				<label class="col-sm-3 control-label">类型：</label>
				<div class="col-sm-8">
					<input id="type" name="type" class="form-control" type="text" required>
				</div>
			</div>
			<div class="form-group">	
				<label class="col-sm-3 control-label">描述：</label>
				<div class="col-sm-8">
					<input id="description" name="description" class="form-control" type="text">
				</div>
			</div>
			<div class="form-group">	
				<label class="col-sm-3 control-label">排序（升序）：</label>
				<div class="col-sm-8">
					<input id="sort" name="sort" class="form-control" type="text" required>
				</div>
			</div>
			<!--<div class="form-group">
				<label class="col-sm-3 control-label">父级编号：</label>
				<div class="col-sm-8">
					<input id="parentId" name="parentId" class="form-control" type="text">
				</div>
			</div>
			<div class="form-group">	
				<label class="col-sm-3 control-label">创建者：</label>
				<div class="col-sm-8">
					<input id="createBy" name="createBy" class="form-control" type="text">
				</div>
			</div>
			<div class="form-group">	
				<label class="col-sm-3 control-label">创建时间：</label>
				<div class="col-sm-8">
					<input id="createDate" name="createDate" class="form-control" type="text">
				</div>
			</div>
			<div class="form-group">	
				<label class="col-sm-3 control-label">更新者：</label>
				<div class="col-sm-8">
					<input id="updateBy" name="updateBy" class="form-control" type="text">
				</div>
			</div>
			<div class="form-group">	
				<label class="col-sm-3 control-label">更新时间：</label>
				<div class="col-sm-8">
					<input id="updateDate" name="updateDate" class="form-control" type="text">
				</div>
			</div>-->
			<div class="form-group">	
				<label class="col-sm-3 control-label">备注信息：</label>
				<div class="col-sm-8">
					<input id="remarks" name="remarks" class="form-control" type="text">
				</div>
			</div>
<!--			<div class="form-group">
				<label class="col-sm-3 control-label">删除标记：</label>
				<div class="col-sm-8">
					<input id="delFlag" name="delFlag" class="form-control" type="text">
				</div>
			</div>-->
		</form>
	</div>
    <div th:include="include::footer"></div>
    <script type="text/javascript">
		var prefix = ctx + "sys/dict"
		$("#form-dict-add").validate({
			onkeyup: false,
			rules:{
				value:{
					required:true,
				},
				label:{
					required:true,
				},
				type:{
					required:true,
				},
				sort:{
					required:true,
				},
			},
			// messages: {
			// 	"value": {
			// 		remote: "数据值不能为空"
			// 	},
			// 	"email": {
			// 		remote: "Email已经存在"
			// 	},
			// 	"phonenumber":{
			// 		remote: "手机号码已经存在"
			// 	}
			// }
		});
		
		function submitHandler() {
	        if ($.validate.form()) {
	            $.operate.save(prefix + "/addDo", $('#form-dict-add').serialize());
	        }
	    }
	</script>
</body>
</html>
